#include "test.h"

namespace Test
{
    void testName()
    {
        {
            ScannerTest test("/Name1/Name2 /Name3%comment\r/");

            test.checkNext( stName, "Name1" );      // terminated by '/' character
            test.checkNext( stName, "Name2" );      // terminated by ' ' character
            test.checkNext( stWhiteSpace, " " );
            test.checkNext( stName, "Name3" );      // terminated by '%' character
            test.checkNext( stComment, "comment" );
            test.checkNext( stEOL, "\r" );
            test.checkNext( stName, "" );           // empty name is valid
        }
        {
            ScannerTest test("/Adobe#20Green/PANTONE#205757#20CV/paired#28#29parentheses/The_Key_of_F#23_Minor/A#42");

            test.checkNext( stName, "Adobe Green" );
            test.checkNext( stName, "PANTONE 5757 CV" );
            test.checkNext( stName, "paired()parentheses" );
            test.checkNext( stName, "The_Key_of_F#_Minor" );
            test.checkNext( stName, "AB" );
        }
    }
}